var { app, bind } = layui.app;
var $ = layui.$;

var data = app.proxy({
    a: 1,
    b: {
        c: 0
    },
    d: [1, 2, 3, 4, 5],
    html: `<p>我的html</p>`
});
function add() {
    data.b.c++
}

app.onMount = function () {
    console.log("home挂载了")
}

app.beforeUpdate = function () {
    console.log("home渲染前")
}

app.afterUpdate = function () {
    console.log("home渲染后")

    bind.find(".add").click(function () {
        add()
    })
}

app.onDestroy = function () {
    console.log("home卸载了")
}